home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 9.7 KB | 303 lines | [TEXT/MPS ] |
- #####################################################################################
- # Dummy target just in case some variables are empty
- #####################################################################################
-
- SafeTarget = "{FWToolsDir}MacMake.rul"
-
- #####################################################################################
- # CFM Static Library
- #
- # A static library target is the same as the IDE target (SOM and resources)
- # plus the code target (.o)
- #
- # The static target is <module>.LIB (abstract)
- #
- # All object files in __ComponentObjects are libbed into <module>.o in the
- # objects folder. It you want it in the Lib folder see the .bmk for the
- # OS:Layer.
- #
- # All som and resource files are built as described below for the .IDE target.
- #####################################################################################
-
- "{_FWTargetObjectsDir}{__ComponentName}.LIB" ƒ ∂
- "{_FWTargetObjectsDir}{__ComponentName}.IDE" ∂
- "{_FWLibDir}{__ComponentName}.o" ∂
- {__OtherComponentDependencies}
-
- "{_FWLibDir}{__ComponentName}.o" ƒ ∂
- {__ComponentObjects} {SafeTarget}
- {_FWEcho} {_FWEchoOptions} "Libbing: {__ComponentName}.o"
- {_FWLib} ∂
- {__StaticLibraryLinkOptions} ∂
- {__ComponentObjects} ∂
- -o {TargDir}{__ComponentName}.o
-
- #####################################################################################
- # Resources build Target
- #
- # This is an abstract target for building just resources.
- #
- # The IDE target is <module>.RSED (abstract)
- #
- # All resource files in __ComponentResources are built and consolidated into
- # <module>.IDE.rsrc in the objects directory.
- #####################################################################################
- # Abstract Target dependencies
- "{_FWTargetObjectsDir}{__ComponentName}.RSED" ƒ ∂
- {__ComponentResources} {SafeTarget}
-
- "{_FWTargetObjectsDir}{__ComponentName}.IDE.rsrc" ƒ ∂
- {__ComponentResources} {SafeTarget}
- #{_FWEcho} {_FWEchoOptions} "Consolidating: {__ComponentName}"
- #Begin
- # for __resourceFile__ in {__FrameworkResources}
- # echo "include ∂"{__resourceFile__}∂" not ∂'ckid∂';"
- # end
- # for __resourceFile__ in {__ComponentResources}
- # echo "include ∂"{__resourceFile__}∂" not ∂'ckid∂';"
- # end
- #End | {_FWRC} -t rsrc -c RSED -o "{_FWTargetObjectsDir}{__ComponentName}.IDE.rsrc"
-
- #####################################################################################
- # SOM build target
- #
- # This an abstract target to get somc to update all the SOM-related files. It's meant
- # to be used by Rainbow.
- #
- # All som-dependent files in __ComponentSourcesFromIDL are updated by the SOM
- # compiler.
- #####################################################################################
-
- "{_FWTargetObjectsDir}{__ComponentName}.SOM" ƒ ∂
- {__ComponentSourcesFromIDL} {SafeTarget}
-
- #####################################################################################
- # IDE build Target
- #
- # This is an abstract target for building resources and SOM-related files for
- # the MetroWerks and Symantec IDEs (which will soon enough build their own rsrc files).
- #
- # The IDE target is <module>.IDE (abstract)
- #
- # All it does is invoke the .RSED and .SOM targets.
- #####################################################################################
- # Abstract Target dependencies
- "{_FWTargetObjectsDir}{__ComponentName}.IDE" ƒ ∂
- "{_FWTargetObjectsDir}{__ComponentName}.SOM" ∂
- "{_FWTargetObjectsDir}{__ComponentName}.RSED"
-
- #####################################################################################
- # Inference Rules
- #####################################################################################
-
- .a.o ƒ .a
- {_FWEcho} {_FWEchoOptions} "Assembling: {default}.a"
- {_FWAsm} ∂
- {_FWAsmOptions} ∂
- {__IncludeDirs} ∂
- -o {_FWObjDir}{default}.a.o ∂
- {depDir}{default}.a
-
- .c.o ƒ .c
- {_FWEcho} {_FWEchoOptions} "Compiling: {default}.c"
- {_FWC} ∂
- {_FWCOptions} ∂
- {__COptions} ∂
- {__IncludeDirs} ∂
- -o {TargDir}{default}.c.o ∂
- {depDir}{default}.c
-
- .cp.o ƒ .cp
- {_FWEcho} {_FWEchoOptions} "Compiling: {default}.cp"
- {_FWCpp} ∂
- {_FWCppOptions} ∂
- {__CppOptions} ∂
- {__CIncludeDirs} ∂
- {__IncludeDirs} ∂
- -o {TargDir}{default}.cp.o ∂
- {depDir}{default}.cp
-
- .cpp.o ƒ .cpp
- {_FWEcho} {_FWEchoOptions} "Compiling: {default}.cpp"
- # We use a precompiled header file only if {__PrecompiledHeaderFile} is defined.
- If `Exists {__PrecompiledHeaderFile}`
- {_FWCpp} ∂
- {_FWCppOptions} ∂
- {__CppOptions} ∂
- {__IncludeDirs} ∂
- {__CIncludeDirs} ∂
- -load {__PrecompiledHeaderFile} ∂
- -o {TargDir}{default}.cpp.o ∂
- {depDir}{default}.cpp
- Else
- {_FWCpp} ∂
- {_FWCppOptions} ∂
- {__CppOptions} ∂
- {__IncludeDirs} ∂
- {__CIncludeDirs} ∂
- -o {TargDir}{default}.cpp.o ∂
- {depDir}{default}.cpp
- End
-
- .cpp ƒ .idl
- {_FWEcho} {_FWEchoOptions} "Compiling: {default}.idl --> {default}.cpp"
- somc ∂
- {__IDLIncludeDirs} ∂
- -m cpluscpp -p -e xc ∂
- -D __PRIVATE__ ∂
- -I "{ODF}Found:FWCommon:" ∂
- -I "{FWSOMIncludes}" ∂
- -I "{FWODIDLIncludes}" ∂
- -o {TargDir} ∂
- {depDir}{Default}.idl
- SetFile -m . {Targ}
-
- .xih ƒ .idl
- {_FWEcho} {_FWEchoOptions} "Compiling: {Default}.idl --> {Default}.xih"
- somc ∂
- {__IDLIncludeDirs} ∂
- -m cpluscpp -p -e xih ∂
- -D __PRIVATE__ ∂
- -I "{ODF}Found:FWCommon:" ∂
- -I "{FWSOMIncludes}" ∂
- -I "{FWODIDLIncludes}" ∂
- -o {TargDir} ∂
- -m chkexcept ∂
- {DepDir}{Default}.idl
-
- .xh ƒ .idl
- {_FWEcho} {_FWEchoOptions} "Compiling: {Default}.idl --> {Default}.xh"
- somc ∂
- {__IDLIncludeDirs} ∂
- -m cpluscpp -e xh ∂
- -D __PRIVATE__ ∂
- -I "{ODF}Found:FWCommon:" ∂
- -I "{FWSOMIncludes}" ∂
- -I "{FWODIDLIncludes}" ∂
- -o {TargDir} ∂
- -m chkexcept ∂
- {DepDir}{Default}.idl
-
- .rsrc ƒ .fr
- {_FWEcho} {_FWEchoOptions} "ODFrc: {default}.fr --> {Default}.rsrc"
- {_FWODFRC} ∂
- {_FWODFRCOptions} ∂
- {__FWRCIncludeDirs} ∂
- -o {TargDir}{default}.rsrc ∂
- {DepDir}{default}.fr
-
- .rsrc ƒ .r
- {_FWEcho} {_FWEchoOptions} "Rezzing: {default}.r --> {Default}.rsrc"
- {_FWRC} ∂
- {_FWRCOptions} ∂
- {__FWRCIncludeDirs} ∂
- -o {TargDir}{default}.rsrc ∂
- {DepDir}{default}.r
-
- #####################################################################################
- # Maintenance Targets
- #####################################################################################
-
- "{_FWTargetObjectsDir}"CleanObj ƒ
- {_FWEcho} {_FWEchoOptions} "Deleting Object Files from: {_FWTargetObjectsDir}"
- delete -y -i {__ComponentObjects}
-
- "{_FWTargetObjectsDir}"CleanRes ƒ
- {_FWEcho} {_FWEchoOptions} "Deleting Resources from : {_FWTargetObjectsDir}"
- delete -y -i {__ComponentResources}
-
- "{_FWTargetObjectsDir}"CleanLib ƒ
- {_FWEcho} {_FWEchoOptions} "Deleting Libraries from : {_FWLibDir}"
- delete -y -i "{_FWLibDir}{__ComponentName}.o"
- delete -y -i "{_FWLibDir}{__ComponentName}.rsrc"
-
- "{_FWTargetObjectsDir}"CleanAll ƒ ∂
- "{_FWTargetObjectsDir}"CleanObjects ∂
- "{_FWTargetObjectsDir}"CleanResources ∂
- "{_FWTargetObjectsDir}"CleanLibs
-
- "{_FWTargetObjectsDir}"KillDir ƒ ∂
- "{_FWTargetObjectsDir}"CleanLibs
- {_FWEcho} {_FWEchoOptions} "Deleting Build Directory: {_FWTargetObjectsDir}"
- delete -y -i "{_FWTargetObjectsDir}"
-
- #####################################################################################
- # CFM Shared Libraries
- #
- # A shared library target is the same as the IDE target (som/idl and resources)
- # plus it will use the MPW-hosted compiler specified by the build suite to compile
- # the object files. This case will mainly be CFM-68K
- #
- # The shared library target is <module>.CFM (abstract)
- #
- # All __ComponentObjects are linked into a shared library in the objects folder.
- #
- # All som/idl and resource files are built as described in MacMake.rul for the IDE
- # target.
- #####################################################################################
- # Abstract Target dependencies
- "{_FWTargetObjectsDir}{__ComponentName}.CFM" ƒ ∂
- "{_FWTargetObjectsDir}{__ComponentName}.IDE" ∂
- "{_FWBinDir}{__ComponentName}" ∂
- {__OtherComponentDependencies}
-
- "{_FWBinDir}{__ComponentName}" ƒ ∂
- "{_FWObjDir}{__ComponentName}.pef"
- duplicate -y "{_FWObjDir}{__ComponentName}.pef" {Targ}
- If `Exists "{_FWObjDir}{__ComponentName}.SYM"`
- duplicate -y "{_FWObjDir}{__ComponentName}.SYM" {Targ}.SYM
- End
-
- "{_FWObjDir}{__ComponentName}Cache.rsrc" ƒ ∂
- {__FrameworkResources} ∂
- {__ComponentResources}
- {_FWEcho} {_FWEchoOptions} "Consolidating: {__ComponentName}"
- Begin
- for __resourceFile__ in {__FrameworkResources}
- echo "include ∂"{__resourceFile__}∂";"
- end
- for __resourceFile__ in {__ComponentResources}
- echo "include ∂"{__resourceFile__}∂";"
- end
- End | {_FWRC} -a -o "{_FWObjDir}{__ComponentName}Cache.rsrc"
-
- "{_FWObjDir}{__ComponentName}.seg" ƒ ∂
- {__ComponentObjects} ∂
- {__OpenDocObjects} ∂
- {__ODFObjects} ∂
- {__OtherObjects}
- {_FWEcho} {_FWEchoOptions} "Linking: {_FWObjDir}{__ComponentName}"
- {_FWLink} ∂
- {_FWLinkOptions} ∂
- {__SharedLibraryLinkOptions} ∂
- -weaklib QuickDrawGXLib,AppleScriptLib{__WeakLinkLibs} ∂
- -init {__CFMInitFunction} ∂
- {__Exports} ∂
- {__InitLibs} ∂
- {__ComponentObjects} ∂
- {__ODFObjects} ∂
- {__OpenDocObjects} ∂
- {__OtherObjects} ∂
- {__SystemObjects} ∂
- -o {Targ}
- # If !{Status}
- # ILinkToSym -mf {Targ}.NJ -o "{_FWObjDir}{__ComponentName}".SYM
- # End
-
- "{_FWObjDir}{__ComponentName}.pef" ƒ ∂
- "{_FWObjDir}{__ComponentName}.seg" ∂
- "{_FWObjDir}{__ComponentName}Cache.rsrc"
- If "{_FWLink}" == 'ILink'
- MakeFlat "{_FWObjDir}{__ComponentName}".seg -o {Targ}
- Else
- Duplicate -y "{_FWObjDir}{__ComponentName}".seg {Targ}
- End
- {_FWEcho} {_FWEchoOptions} Copying Resources From: "{_FWObjDir}{__ComponentName}Cache.rsrc"
- Echo "include ∂"{_FWObjDir}{__ComponentName}Cache.rsrc∂";" | Rez -a -o {Targ}
- If {__ComponentSignature}
- SetFile -c {__ComponentSignature} -a B -t 'shlb' -m . {Targ}
- Else
- {_FWEcho} {_FWEchoOptions} "Warning: __ComponentSignature not set; using default (cfmg)."
- SetFile -c 'cfmg' -t 'shlb' -m . {Targ}
- End
-